package someclass;

public class movieDetails {
   // public int[] movieId;
    public Movie[] ownMovie;
    public movieDetails(){
     //   movieId = new int[]{0,1,2,3,4};
        ownMovie=new Movie[5];
        ownMovie[0]=new Movie("Sholay","1975","Ramesh Shppy","N/A");
        ownMovie[1]=new Movie("Sholay","1978","Stanley.B","N/A");
        ownMovie[2]=new Movie("Sholay","1984","YanWeimin","N/A");
        ownMovie[3]=new Movie("Sholay","1988","Kent Beck","N/A");
        ownMovie[4]=new Movie("Sholay","1991","YangXiaoyun","N/A");

    }

    public String showTitle() {
        String title ="List Of All Movies In The Library";
        String subtitle = "Movie       Year        Director      Rating";
        System.out.println(title);
        System.out.println(subtitle);
        return title;
    }
    public void showMovieInfoList(){
        for(int i=0;i<ownMovie.length;i++){
            String message=ownMovie[i].getMovieName()+"      "+ownMovie[i].getMovieYear()+"      "+ownMovie[i].getMovieDirector()+
                    "      "+ownMovie[i].getMovieRating();
            System.out.println(message);
        }
    }
}
